/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.una.pol.ii.is2.domain.flota;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author markos
 */
@Embeddable
public class MarcaModeloPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "mamo_cod_marca")
    private int mamoCodMarca;
    @Basic(optional = false)
    @Column(name = "mamo_cod_modelo")
    private int mamoCodModelo;

    public MarcaModeloPK() {
    }

    public MarcaModeloPK(int mamoCodMarca, int mamoCodModelo) {
        this.mamoCodMarca = mamoCodMarca;
        this.mamoCodModelo = mamoCodModelo;
    }

    public int getMamoCodMarca() {
        return mamoCodMarca;
    }

    public void setMamoCodMarca(int mamoCodMarca) {
        this.mamoCodMarca = mamoCodMarca;
    }

    public int getMamoCodModelo() {
        return mamoCodModelo;
    }

    public void setMamoCodModelo(int mamoCodModelo) {
        this.mamoCodModelo = mamoCodModelo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) mamoCodMarca;
        hash += (int) mamoCodModelo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MarcaModeloPK)) {
            return false;
        }
        MarcaModeloPK other = (MarcaModeloPK) object;
        if (this.mamoCodMarca != other.mamoCodMarca) {
            return false;
        }
        if (this.mamoCodModelo != other.mamoCodModelo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.una.pol.ii.is2.dao.flota.MarcaModeloPK[mamoCodMarca=" + mamoCodMarca + ", mamoCodModelo=" + mamoCodModelo + "]";
    }

}
